package com.cbgolf.oa.activity.order;

import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.Window;
import com.cbgolf.oa.R;
import com.cbgolf.oa.app.AppManager;
import com.cbgolf.oa.contract.IOrderContract.IOrderPresenter;
import com.cbgolf.oa.contract.IOrderContract.IOrderWaiter;
import com.cbgolf.oa.presenter.OrderPresenterImp;
import com.cbgolf.oa.util.ClassUtil;
import com.cbgolf.oa.util.StatusBarUtil;
import com.cbgolf.oa.views.OrderViewImp;
import com.cbgolf.oa.widget.autolayout.utils.AutoUtil;

/**
 * @author lq
 * @date 2018/4/11
 */

public class OrderActivity extends FragmentActivity implements IOrderWaiter {

  /**
   * presenter
   */
  private IOrderPresenter presenter;


  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    AppManager.getNewInstance().addActivity(this);
    setContentView(R.layout.a_order);
    StatusBarUtil.setStatusBarTranslucent(this, false);
    AutoUtil.auto(this);
    init();
  }

  protected void init() {
    findViews();
  }

  protected void findViews() {
    presenter = new OrderPresenterImp(new OrderViewImp(this, this));
  }

  @Override
  public String getActivityTitle() {
    return "我的订单";
  }

  @Override
  public void back() {
    ClassUtil.finish(this);
  }
}
